<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCashRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cash_records', function (Blueprint $table) {
            $table->increments('id')->comment('主键id');
            $table->integer('uid')->comment('用户id');
            $table->decimal('amount',10,2)->comment('提现金额');
            $table->integer('account')->comment('该条记录用户提现的账户号码');
            $table->string('account_name')->comment('该条记录用户提现的账户姓名');
            $table->tinyInteger('status')->comment('状态: 0为作废,1为待处理，2为成功，3为失败');
            $table->integer('create_time')->comment('该条记录的生成时间');
            $table->integer('update_time')->nullable()->comment('该条记录的更新时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('cash_records');
    }
}
